{layout name="layout/header" /}
<link href="root/css/plugins/datapicker/datepicker3.css" rel="stylesheet">

<!--<link href="root/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">-->

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>统计</h5>
                    <div class="ibox-tools">
                        <button type="button" class="btn btn-primary btn-sm refresh">刷新</button>
                    </div>
                </div>
                <div class="ibox-title">
                    <form role="form" class="form-inline">
                        <div class="form-group">
                            <label class="">起止日期</label>
                        </div>
                        <div class="form-group">
                            <input type="text" placeholder="开始日期" id="start" value="{$time1}" readonly class="form-control datetimepicker">
                        </div>
                        <div class="form-group">
                            <input type="text" placeholder="结束日期" id="end" value="{$time2}" readonly class="form-control datetimepicker">
                        </div>
                        <button class="btn btn-white" id="search1">查询</button>
                        <!--<div class="form-group">-->
                            <!--<label class="">按月查询</label>-->
                        <!--</div>-->
                        <!--<div class="form-group">-->
                            <!--<input type="text" id="month" value="{$month}" readonly class="form-control">-->
                        <!--</div>-->
                        <!--<button class="btn btn-white" id="search2">查询</button>-->
                    </form>
                </div>
            </div>
            <!--查询数据-->
            <div class="ibox-content">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>订单总金额(A)</th>
                        <th>一级分销总金额(B1)</th>
                        <th>二级分销总金额(B2)</th>
                        <th>三级分销总金额(B3)</th>
                        <th>分销总金额(E)</th>
                        <th>平台提成(C)</th>
                        <th>红包总金额(D)</th>
                        <th>申请提现总金额(F)</th>
                        <th>提现手续费(G)</th>
                        <th>提现实际支出(H)</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>

                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="5">

                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>

</div>


<!--layer-->
<script src="root/js/plugins/layer/layer.min.js"></script>
<!-- Data picker -->
<script src="root/js/plugins/datapicker/bootstrap-datepicker.js"></script>

<script>
    $('.datetimepicker').datepicker({
        format: 'yyyy-mm-dd',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 3,
        minView: 3,
        forceParse: 0,
        endDate:new Date()
    });
    $('#month').datepicker({
        format: 'yyyy-mm',
        language:  'zh-CN',
        autoclose: 1,
        startView: 1,
        minViewMode: 1,
        forceParse: 0,
        endDate:new Date()
    });
    $(function () {
        $('#search1').click(function () {
            var start = $('#start').val().trim();
            var end = $('#end').val().trim();
            if(start =='' || end==''){
                layer.msg('起止日期不能为空');
                return false;
            }
            var url = "{:url('index')}"+"/start/"+start+"/end/"+end;
            window.location.href = url;
            return false;
        });

        $('#search2').click(function () {
            var month = $('#month').val().trim();
            if(month ==''){
                layer.msg('请选择月份');
                return false;
            }
            var url = "{:url('index')}"+"/month/"+month;
            window.location.href = url;
            return false;
        });

    })
</script>
